<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1"/>
    <meta name="author" content="zhy"/>
    <title>Basic sigma.js example</title>
    <style type="text/css">
        body {
        margin: 0;
        }
        #container {
        position: absolute;
        width: 100%;
        height: 100%;
        }
    </style>
    <script>
        function alertObj(obj){
	var output = "";
	for(var i in obj){
		var property=obj[i];
		output+=i+" = "+property+"\n";
	}
	alert(output);
}



    </script>
</head>
<body>
<div id="container"></div>
<script src="http://maislook.oss-cn-shanghai.aliyuncs.com/sigma.min.js"></script>
<script>
    // Let's first initialize sigma:
    var s = new sigma('container');

    // Then, let's add some data to display:
  s.graph.read({
  nodes: [
    { id: 'n0',x:1,y:1,size: 1,label: 'Hello','hover':'be3_login' },
    { id: 'n1',x:0,y:0,size: 1,label: 'world' }
  ],
  edges: [
    {
      id: 'e0',
      source: 'n0',
      target: 'n1'
    }
  ]
});

    // Finally, let's ask our sigma instance to refresh:
    s.refresh();
    s.bind("overNode", function (e) { alert(e.data.node['id']) });



</script>
</body>
</html>